Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset "can stand on top" flag and map after disconnection in FiveM #2393

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

Disquse
Copy link
Contributor

@Disquse Disquse commented Feb 15, 2024

Goal of this PR

The goal of this PR is to fix an oversight where the "can stand on top" flag (g_overrideCanPedStandOnVehicle) and the vehicle map (g_canPedStandOnVehicles) weren't reset after disconnection from a server. Also, tweak some natives to use getAndCheckVehicle to avoid code duplication.

How is this PR achieving the goal

This PR achieves the goal by resetting the flag and map during OnKillNetworkDone. Also, it tweaks the relevant code to use the getAndCheckVehicle helper.

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 1604, 2060, 2189, 2372, 2545, 2612, 2699, 2802, 2944, 3095

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@gottfriedleibniz gottfriedleibniz added the ready-to-merge This PR is enqueued for merging label Feb 15, 2024
@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Feb 15, 2024
@Disquse Disquse removed the triage Needs a preliminary assessment to determine the urgency and required action label Feb 15, 2024
@thorium-cfx thorium-cfx merged commit 179e4fd into citizenfx:master Feb 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants